﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace BDSim
{
    public class CClkSimDLL
    {
        /// <summary>
        /// 钟差仿真计算结果输出
        /// </summary>
        /// <param name="pSimParam">钟差仿真计算时间参数信息(pStartTime仿真开始时间(UTC:年月日时分秒),simStepInt仿真步长(微秒),simClks当前仿真步数计数(从0开始));</param>
        /// <param name="pClkErr_Input">钟差仿真计算输入参数信息(TimeId时间计数,clk卫星原子钟属性(包括初始钟差、初始频移、老化率、采样间隔(S)、噪声强度)、allan方差(目前未用到),addNoise  1表示白噪声 ；5表示5噪声);</param>
        /// <param name="pClkErr_Output">钟差仿真计算结果信息(clkerr卫星钟差计算结果(当前整步点计数、采样间隔、前二整步点钟差、前一整步点钟差、当前整步点钟差、后一整步点钟差、后二整步点钟差))。</param>


        [DllImport("CClkSimDLL.dll", EntryPoint = "ClockErrCal_Output", CallingConvention = CallingConvention.Cdecl)]
        public static extern void ClockErr_Output(SimParam pSimParam, ClkErr_Input pClkErr_Input, out ClkErr_Output pClkErr_Output);

        /// <summary>
        /// 钟差仿真插值输出
        /// </summary>
        /// <param name="pClkTrp_Input">钟差插值模型参数信息(tobs插值时刻点(相对于初始时刻s),a[7](当前整步点计数、采样间隔、前二整步点钟差、前一整步点钟差、当前整步点钟差、后一整步点钟差、后二整步点钟差));</param>
        /// <param name="pClkTrp_Param">钟差插值计算开关(Iclo(0:不考虑钟差，1:考虑钟差))。</param>
        /// <param name="pClkTrp_Output">钟差插值计算结果信息(DeltClock钟差插值结果(S))。</param>
        [DllImport("CClkSimDLL.dll", EntryPoint = "ClockErrCal_Trp", CallingConvention = CallingConvention.Cdecl)]
        public static extern void ClockErr_Trp(ClkTrp_Input pClkTrp_Input, ClkTrp_Param pClkTrp_Param, out ClkTrp_Output pClkTrp_Output);
    }
}
